<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.hs.*,com.hs.pre.model.SortSimBean"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
List list = new ArrayList();
if(request.getAttribute("list") != null)
   list = (List)request.getAttribute("list");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>app/js/">
    
   <title><%=Environment.getValue(Environment.PROP_APP_TITLE) %></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="StyleSheet" href="<%=basePath%>app/js/dtree.css" type="text/css">
	<script type="text/javascript" src="<%=basePath%>app/js/dtree.js"></script>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  <body>
<div class="dtree">
	<script type="text/javascript">
		<!--
		d = new dTree('d');
		d.add(0,-1,'分类');
	  	<%
		 Iterator iterator = list.iterator();
		 while(iterator.hasNext())
		 {
		 SortSimBean sortSimBean = (SortSimBean)iterator.next();
		  %>
		 d.add(<%=sortSimBean.getSortId() %>,<%=sortSimBean.getPerId() %>,'<%=sortSimBean.getSortName() %>','<%=basePath%>app/pre/search.do?sortId=<%=sortSimBean.getSortId() %>&q=<%=request.getParameter("q") %>','','_parent');
		 <%}%>
		document.write(d);
		//-->
	</script>
</div>
  </body>
</html>
